home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3271 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  812 b 

  1. Path: news.infinet.com!day-p041
  2. From: jmonnin@infinet.com (Joe Monnin)
  3. Newsgroups: comp.lang.c
  4. Subject: Interprocess Communication in Linux
  5. Date: Thu, 25 Jan 96 05:59:34 GMT
  6. Organization: InfiNet
  7. Distribution: world
  8. Message-ID: <4e768q$sfc@news1.infinet.com>
  9. NNTP-Posting-Host: day-p041.infinet.com
  10. Keywords: ipc Linux msgsnd
  11. X-Newsreader: News Xpress Version 1.0 Beta #2
  12.  
  13. I'm having a problem sending a message from one process to another in Linux.  My function reads something like:
  14.  
  15.  
  16. void function{
  17.      struct msgbuf message;
  18.  
  19.     msgid=1;
  20.     result=msgsnd(msgid,&message,MSGMAX,IPC_NOWAIT);
  21. }
  22.  
  23. the functions returns a -1 indiacting an error, and errno is set to EFAULT which my documention says means "address
  24. pointed to by message is not accessable."  Why isn't it accessable?  It would be to any other function.
  25.  
  26.